package com.shopping.mapper;

import com.shopping.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {
     @Select("select * from myshopping.tbl_user where user_name=#{username}")
     public UserInfo queryUserByUserName(String username);

     @Insert("insert into myshopping.tbl_user values (default,#{user_name},#{user_password},#{user_email},#{user_birthday},#{user_hobbys},#{user_sex},#{user_address},0)")
     void register(UserInfo userInfo);
}
 